package com.summer.wxapp.util;

import java.io.FileNotFoundException;
import java.io.IOException;
import java.util.Properties;

public class WechatAppConstants {

	private static Properties props;
	static {
		props = new Properties();
		try {
			props.load(WechatAppConstants.class.getClassLoader()
					.getResourceAsStream("wechatApp.properties"));
		} catch (FileNotFoundException e) {
			throw new RuntimeException("找不到wechatApp.properties文件", e);
		} catch (IOException e) {
			throw new RuntimeException("读取wechatApp.properties文件出错", e);
		}
	}
	
	public final static class Config {
		
		/**
		 * url
		 */
		public final static String url = props.getProperty("url");
		/**
		 * appId
		 */
		public final static String appId = props.getProperty("appId");
		/**
		 * appSecret
		 */
		public final static String appSecret = props.getProperty("appSecret");
		
	}
}
